{% extends 'finance/base.html' %}
{% block title %}
    鹏博首页
{% endblock title %}
{% block content %}
{##}
{#    for row in $results:#}
{#      fname = row[0]#}
{#      lname = row[1]#}
{#      age = row[2]#}
{#      sex = row[3]#}
{#      income = row[4]#}
{#      # 打印结果#}
{#      print "fname=%s,lname=%s,age=%d,sex=%s,income=%d" % (fname, lname, age, sex, income )#}

 <table border="1px solid blue" cellpadding="0">
       <thead>
            <td colspan="4">月初节余:现金20000</td>
       <td colspan="2">计划现况-200</td>
       <td colspan="2">当下理论节余:现金800</td>
       </thead>
        <thead>
            <td>序号</td>
            <td>是否计划项</td>
            <td>支出或收入</td>
            <td>消费方式</td>
            <td>金额</td>
            <td>记录时间</td>
            <td>操作时间</td>
             <td>操作</td>
       </thead>
       <tbody>
       <tr>
            <td colspan="8"><input type="button" id="addrecord" value="+" style="width:100%;height:100%" /></td>
{#            <td colspan="7">增加消费项或是收入项</td>#}
       </tr>
        <tr style="display:none">
            <td>
            </td>
            <td>
                <input type="button" value="是" style="float:left"/>
                <input type="button" value="否" style="float:left"/>
            </td>
            <td>
                <input type="button" value="支出" style="float:left"/>
                <input type="button" value="收入" style="float:left"/>
            </td>
            <td>
                <input type="button" value="现金" style="float:left"/>
                <input type="button" value="银行卡" style="float:left"/>
                <input type="button" value="支付宝" style="float:left"/>
            </td>
            <td><input type="text" value=""/></td>
            <td><input type="text" value=""/></td>
            <td><input type="text" value=""/></td>
            <td>确认</td>
       </tr>
       <tr>
            <td>1</td>
            <td>餐费</td>
            <td>支出</td>
            <td>现金</td>
            <td>18</td>
            <td>2015-10-16 15：20：10</td>
            <td>2015-10-16 15：20：10</td>
            <td>-</td>
       </tr>
       <tr>
            <td colspan="5" style="">汇总</td>
            <td  colspan="3">当前已花费总额:现金10000</td>
       </tr>
       </tbody>

   </table>
    <script>
    $("table tr #addrecord").click(function(){
        var thattr = $(this).parent("td").parent("tr");
        thattr.css("display","none");
        var nextstr = thattr.next("tr");
{#        var newcord = nextstr.clone(true);#}
        nextstr.css("display","table-row");
{#        $("table tbody").append(newcord);#}
    })

    
</script>
{% endblock %}
